<?php
/**
 * Redis.php
 * 文件描述
 * Created on 2018/4/17 13:37
 * Create by xuanqiang
 */
namespace app\index\controller;

class Redis {

    public function index(){
        $redis = new \redis();
        $result = $redis->connect('127.0.0.1',6379);
        $redis->set('test','test_value');
        $value = $redis->get('test');
        var_dump($result);
        var_dump($value);
    }
}